<div class="panel panel-success">
    <div class="panel-heading">机构信息查询</div>
    <div class="panel-body">
        <form class="form-inline" role="form">
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-addon">名称</div>
                    <input class="form-control" type="text" ng-model="keyname" placeholder="机构名称">
                </div>
                <div class="input-group">
                    <div class="input-group-addon">编码</div>
                    <input class="form-control" type="text" ng-model="keycode" placeholder="编码">
                </div>
            </div>
            <button type="button" class="btn btn-default btn-primary" ng-click="query()"><span class="glyphicon glyphicon-search"></span> 查 询 </button>
            <button type="button" class="btn btn-default btn-success" ng-click="showCreateModal()"><span class="glyphicon glyphicon-plus"></span> 新 建 </button><!-- Single button -->
            【<b>code：</b>{{code}}】【<b>order：</b>{{order}}】【<b>createModal：</b>{{createModal}}】
        </form>
    </div>
</div>
<table class="table table-bordered table-responsive table-striped">
    <thead>
    <tr class="bg-success">
        <th ng-click="orderBy('name1')">机构名称</th><th ng-click="orderBy('address1')">地址</th><th  ng-click="orderBy('code1')">编码</th><th ng-click="orderBy('tel1')">电话</th><th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="org in orgs | filter:{code:keycode,name:keyname} | orderBy:order">
        <td>{{org.name}}</td><td>{{org.address}}</td><td>{{org.code}}</td><td>{{org.tel}}</td>
        <td style="width:250px;">
            <button class="btn btn-xs btn-success"><span class="glyphicon glyphicon-eye-open"></span> 浏览</button>
            <button class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-minus"></span> 删除</button>
            <button class="btn btn-xs btn-warning"><span class="glyphicon glyphicon-pencil"></span> 修改</button>
        </td>
    </tr>
    </tbody>
</table>
<div class="zhtt-modal panel panel-success" ng-hide="createModal">
    <div class="panel-heading">
        <h3 class="panel-title">新建机构</h3>
    </div>
    <div class="panel-body">
        <div >
            <form class="form-horizontal" role="form" name="createForm">
                <div class="form-group">
                    <label class="col-sm-3 control-label">机构名称</label>
                    <div class="col-sm-8">
                        <input type="text" name="name" ng-model="name" class="form-control"  placeholder="机构名称"  ng-maxlength="5">
                        <span class="text-danger" ng-show="createForm.name.$dirty && createForm.name.$invalid">
                            本框长度必须小于5
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">电话</label>
                    <div class="col-sm-8">
                        <input type="text" name="tel" ng-model="tel" class="form-control" placeholder="电话"  ng-maxlength="11">
                        <span class="text-danger" ng-show="createForm.tel.$dirty && createForm.tel.$invalid">
                            本框长度必须小于12
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">编码</label>
                    <div class="col-sm-8">
                        <input type="text" name="code" ng-model="code" class="form-control" placeholder="编码" ng-maxlength="4">
                        <span class="text-danger" ng-show="createForm.code.$dirty && createForm.code.$invalid">
                            本框长度必须小于4
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">地址</label>
                    <div class="col-sm-8">
                        <input type="text" name="address" ng-model="address" class="form-control" placeholder="地址">
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="panel-footer">
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="button" ng-click="save()" class="btn btn-default"> 保 存 </button>
                <button type="button" ng-click="save()" class="btn btn-default"> 取 消 </button>
            </div>
        </div>
    </div>
</div>